package com.hzdl.car.mapper;

import com.hzdl.car.bean.Log;
import com.hzdl.car.sqlprovider.LogSqlProvider;
import com.hzdl.car.vo.LogVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

@Mapper
public interface LogMapper {
    @SelectProvider(type = LogSqlProvider.class ,method = "findLog")
    List<Log> findLog(LogVo logVo);
    @Insert("insert into sys_log_login (loginName,loginIp,loginTime) " +
            "values (#{loginName},#{loginIp},now())")
    int addLog(LogVo logVo);
    @Delete("delete from sys_log_login where id=#{id}")
    int dekLog(LogVo logVo);
}
